package pl.edu.agh.anomalyids.lerad.aspect.implementation;

import pl.edu.agh.anomalyids.lerad.aspect.AbstractAspect;
import pl.edu.agh.anomalyids.lerad.aspect.enums.AspectType;
import pl.edu.agh.anomalyids.lerad.aspect.enums.Match;
import pl.edu.agh.anomalyids.network.Packet;

/**
 * Kontener na adres IPv4 lub IPv6.
 * 
 * @author Andrzej
 * 
 */
public class IpAddressAspect extends AbstractAspect<String> {

	private static final long serialVersionUID = 6748038910749924277L;

	/**
	 * Konstruktor. Nalezy podac adres IP.
	 * 
	 * @param ip
	 *            adres IPv4 lub IPv6
	 * @param type
	 *            typ cechy
	 */
	public IpAddressAspect(String ip, AspectType type) {
		super(type);
		this.values.add(ip);
	}

	@Override
	public String toString() {
		return getData();
	}

	@Override
	public Match packetMatchesAspect(Packet packet) {
		return Match.DIFFER;
	}
}
